package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * MngmcnsnId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class MngmcnsnId implements java.io.Serializable {

	// Fields

	private String msnempresa;
	private String msnclase;
	private String msnvinkey;
	private String msntipodoc;
	private Double msnnumedoc;
	private Double msnreg;
	private String msnserial;

	// Constructors

	/** default constructor */
	public MngmcnsnId() {
	}

	/** full constructor */
	public MngmcnsnId(String msnempresa, String msnclase, String msnvinkey,
			String msntipodoc, Double msnnumedoc, Double msnreg,
			String msnserial) {
		this.msnempresa = msnempresa;
		this.msnclase = msnclase;
		this.msnvinkey = msnvinkey;
		this.msntipodoc = msntipodoc;
		this.msnnumedoc = msnnumedoc;
		this.msnreg = msnreg;
		this.msnserial = msnserial;
	}

	// Property accessors

	@Column(name = "MSNEMPRESA", unique = false, nullable = false, insertable = true, updatable = true, length = 3)
	public String getMsnempresa() {
		return this.msnempresa;
	}

	public void setMsnempresa(String msnempresa) {
		this.msnempresa = msnempresa;
	}

	@Column(name = "MSNCLASE", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getMsnclase() {
		return this.msnclase;
	}

	public void setMsnclase(String msnclase) {
		this.msnclase = msnclase;
	}

	@Column(name = "MSNVINKEY", unique = false, nullable = false, insertable = true, updatable = true, length = 15)
	public String getMsnvinkey() {
		return this.msnvinkey;
	}

	public void setMsnvinkey(String msnvinkey) {
		this.msnvinkey = msnvinkey;
	}

	@Column(name = "MSNTIPODOC", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getMsntipodoc() {
		return this.msntipodoc;
	}

	public void setMsntipodoc(String msntipodoc) {
		this.msntipodoc = msntipodoc;
	}

	@Column(name = "MSNNUMEDOC", unique = false, nullable = false, insertable = true, updatable = true, precision = 13, scale = 1)
	public Double getMsnnumedoc() {
		return this.msnnumedoc;
	}

	public void setMsnnumedoc(Double msnnumedoc) {
		this.msnnumedoc = msnnumedoc;
	}

	@Column(name = "MSNREG", unique = false, nullable = false, insertable = true, updatable = true, precision = 8, scale = 1)
	public Double getMsnreg() {
		return this.msnreg;
	}

	public void setMsnreg(Double msnreg) {
		this.msnreg = msnreg;
	}

	@Column(name = "MSNSERIAL", unique = false, nullable = false, insertable = true, updatable = true, length = 50)
	public String getMsnserial() {
		return this.msnserial;
	}

	public void setMsnserial(String msnserial) {
		this.msnserial = msnserial;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MngmcnsnId))
			return false;
		MngmcnsnId castOther = (MngmcnsnId) other;

		return ((this.getMsnempresa() == castOther.getMsnempresa()) || (this
				.getMsnempresa() != null
				&& castOther.getMsnempresa() != null && this.getMsnempresa()
				.equals(castOther.getMsnempresa())))
				&& ((this.getMsnclase() == castOther.getMsnclase()) || (this
						.getMsnclase() != null
						&& castOther.getMsnclase() != null && this
						.getMsnclase().equals(castOther.getMsnclase())))
				&& ((this.getMsnvinkey() == castOther.getMsnvinkey()) || (this
						.getMsnvinkey() != null
						&& castOther.getMsnvinkey() != null && this
						.getMsnvinkey().equals(castOther.getMsnvinkey())))
				&& ((this.getMsntipodoc() == castOther.getMsntipodoc()) || (this
						.getMsntipodoc() != null
						&& castOther.getMsntipodoc() != null && this
						.getMsntipodoc().equals(castOther.getMsntipodoc())))
				&& ((this.getMsnnumedoc() == castOther.getMsnnumedoc()) || (this
						.getMsnnumedoc() != null
						&& castOther.getMsnnumedoc() != null && this
						.getMsnnumedoc().equals(castOther.getMsnnumedoc())))
				&& ((this.getMsnreg() == castOther.getMsnreg()) || (this
						.getMsnreg() != null
						&& castOther.getMsnreg() != null && this.getMsnreg()
						.equals(castOther.getMsnreg())))
				&& ((this.getMsnserial() == castOther.getMsnserial()) || (this
						.getMsnserial() != null
						&& castOther.getMsnserial() != null && this
						.getMsnserial().equals(castOther.getMsnserial())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getMsnempresa() == null ? 0 : this.getMsnempresa()
						.hashCode());
		result = 37 * result
				+ (getMsnclase() == null ? 0 : this.getMsnclase().hashCode());
		result = 37 * result
				+ (getMsnvinkey() == null ? 0 : this.getMsnvinkey().hashCode());
		result = 37
				* result
				+ (getMsntipodoc() == null ? 0 : this.getMsntipodoc()
						.hashCode());
		result = 37
				* result
				+ (getMsnnumedoc() == null ? 0 : this.getMsnnumedoc()
						.hashCode());
		result = 37 * result
				+ (getMsnreg() == null ? 0 : this.getMsnreg().hashCode());
		result = 37 * result
				+ (getMsnserial() == null ? 0 : this.getMsnserial().hashCode());
		return result;
	}

}